/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 登录页样式 */
.login-box {
    width: 400px;
    margin: 100px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

.btn-block {
    width: 100%;
}

.error-msg {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
}

/* 顶部导航栏 */
.navbar {
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 24px;
}

.navbar .user-info {
    display: flex;
    align-items: center;
}

.navbar .logout-btn {
    margin-left: 20px;
    background-color: #e74c3c;
}

.navbar .logout-btn:hover {
    background-color: #c0392b;
}

/* 仪表盘样式 */
.dashboard {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.dashboard h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.stat-card {
    display: inline-block;
    width: 200px;
    height: 100px;
    background-color: #3498db;
    color: #fff;
    text-align: center;
    line-height: 100px;
    border-radius: 8px;
    margin-right: 30px;
    font-size: 20px;
}

/* 员工列表样式 */
.table-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.table-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.table-actions {
    margin-bottom: 20px;
    text-align: right;
}

.add-btn {
    background-color: #2ecc71;
}

.add-btn:hover {
    background-color: #27ae60;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.action-btn {
    padding: 6px 10px;
    font-size: 14px;
    margin-right: 5px;
}

.edit-btn {
    background-color: #f39c12;
}

.edit-btn:hover {
    background-color: #d35400;
}

.delete-btn {
    background-color: #e74c3c;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.view-btn {
    background-color: #9b59b6;
}

.view-btn:hover {
    background-color: #8e44ad;
}

/* 表单页面样式（添加/编辑员工） */
.form-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 30px;
    max-width: 800px;
}

.form-container h2 {
    margin-bottom: 30px;
    color: #2c3e50;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 员工详情页样式 */
.detail-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 30px;
    max-width: 600px;
}

.detail-container h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
}

.detail-item {
    display: flex;
    margin-bottom: 20px;
}

.detail-item label {
    width: 120px;
    font-weight: 500;
    color: #7f8c8d;
}

.detail-item span {
    flex: 1;
    font-size: 16px;
}